import request from "@/utils/request";
const config = require("config");

export default {
  methods: {
    // 获取table数据
    getData(data) {
      return request({
        url: `${config.effengine.path}${this.url}`,
        method: "post",
        headers: {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        data
      });
    },
    // 删除数据
    deleteData(data) {
      return request({
        url: `${config.effengine.path}${this.delUrl}`,
        method: "post",
        headers: {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        data
      });
    },
    // 同步
    syncData() {
      return request({
        url: `${config.effengine.path}${this.syncUrl}`,
        method: "post"
      });
    }
  }
};
